package lesson.Properties;

import java.util.Properties;
import java.util.Set;

public class PropertiesDemo2 {
    public static void main(String[] args) {
        Properties prop = new Properties();

        //1.增
        prop.setProperty("安徽","南京");
        prop.setProperty("浙江","杭州");
        prop.setProperty("江苏","南京");

        //2.获得
        String s1 = prop.getProperty("安徽");
        System.out.println(s1);

        //3.遍历
        Set<String> keys = prop.stringPropertyNames();
        for (String key : keys) {
            String value = prop.getProperty(key);
            System.out.println(key+"..."+value);
        }




    }
}
